//
//  SSDetailsController.m
//  textDemo
//
//  Created by Esther on 2017/2/20.
//  Copyright © 2017年 Esther. All rights reserved.
//

#import "SSDetailsController.h"
#import "SSDetailsHeadImageView.h"
#import "SSShopCarView.h"

@interface SSDetailsController ()
@property(nonatomic, strong) UIScrollView *mainScroll;

@property(nonatomic, strong) SSDetailsHeadImageView *headImageView;
@property(nonatomic, strong) SSShopCarView *shopCarView;


@end

@implementation SSDetailsController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor ss_randomColor];
    
    [self.view addSubview:self.mainScroll];
    
    [self.view addSubview:self.headImageView];

    [self.view addSubview:self.shopCarView];
    
  
    
    
    
}



#pragma mark -
#pragma mark - set
- (void)setFirstSel:(SSFirstSell *)firstSel{
    _firstSel = firstSel;
    self.title = firstSel.name;
    
}



#pragma mark -
#pragma mark - 懒加载
- (UIScrollView *)mainScroll{
    if (!_mainScroll) {
        _mainScroll = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen ss_screenWidth], [UIScreen ss_screenHeight] - 45)];
        _mainScroll.contentSize = CGSizeMake([UIScreen ss_screenWidth], 1000);
//        _mainScroll.backgroundColor = [UIColor whiteColor];
        
        
    }
    return _mainScroll;
}


- (SSDetailsHeadImageView *)headImageView{
    if (!_headImageView) {
        _headImageView = [[SSDetailsHeadImageView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen ss_screenWidth], 230)];
        
    }
    return _headImageView;
}


- (SSShopCarView *)shopCarView{
    if (!_shopCarView) {
        _shopCarView = [[SSShopCarView alloc] initWithFrame:CGRectMake(0, [UIScreen ss_screenHeight] - 110, [UIScreen ss_screenWidth], 45)];
        
    }
    return _shopCarView;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
